package com.zbest.zpay.acctrans.common.model;

import java.io.Serializable;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.zbest.common.lang.enums.BizCode;

public class DBTransactionServiceResult implements Serializable {
    private static final long serialVersionUID = 459931816887550604L;
    /**
     * 是否成功
     */
    private boolean success;

    /**
     * 结果码
     */
    private BizCode bizCode;

    /**
     * 构造器
     */
    public DBTransactionServiceResult() {
    }

    /**
     * 构造器
     *
     * @param success
     * @param bizCode
     */
    public DBTransactionServiceResult(boolean success, BizCode bizCode) {
        this.success = success;
        this.bizCode = bizCode;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public BizCode getBizCode() {
        return bizCode;
    }

    public void setBizCode(BizCode bizCode) {
        this.bizCode = bizCode;
    }

    /**
     * @see Object#toString()
     */
    public String toString() {
        return ToStringBuilder.reflectionToString(this,
                ToStringStyle.SHORT_PREFIX_STYLE);
    }
}
